﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<title></title>
<%@ include file="/WEB-INF/component/commonCSS.jsp"%>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
<div class="box box-primary" id="more" style="width:110px;height:35px;background-color:#222c32;position:absolute;z-index:9999;left:850px;top:100px;display:none;font-size:12px;border-top-color:#222c32;">
            <div class="box-body home-message" id="moreOp" >
            </div>
        </div>
	<section class="content-header">
		<h1><spring:message code="message.lable.compdrugprofileSTDlog"/></h1>
		<ol class="breadcrumb">
			<li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i><spring:message code="message.lable.first"/></a></li>
		    <li class="active"><a href="#"><spring:message code="message.lable.StdManage"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.compdrugprofileStd"/></a></li>
            <li class="active"><a href="#"><spring:message code="message.lable.profileSeeStd"/></a></li>
		</ol>
	</section>
	<section class="content">
		<div class=" box box-success">
			<div class="box-body">
				<div class=" form-inline">
					<div class="form-group form-group-xs">
                    	<label><spring:message code="message.lable.updateTime"/><spring:message code="message.yanZheng.maoHao"/></label>
							<div class="input-group">
		           				  <input class="form-control" type="text" name="startTimeStr" id="createTimeBegin"   placeholder="yyyy-MM-dd" readonly="readonly"
                                  onFocus="var endDate=$dp.$('crateTimeEnd');WdatePicker({maxDate:'#F{$dp.$D(\'crateTimeEnd\')}'})" />
		       				</div>
                    	<label>-</label>
							<div class="input-group">
		           				 <input class="form-control" type="text" name="endTimeStr" id="crateTimeEnd"   placeholder="yyyy-MM-dd" readonly="readonly"
                       				onFocus="WdatePicker({minDate:'#F{$dp.$D(\'createTimeBegin\')}'})" />
		       				</div>
                    	</div>
                    	
                    <input type="button" id="selectDicCompType" onclick="likeQuery();" class="btn btn-success btn-sm" value="<spring:message code="message.button.seachSpacing" />">
                </div>
            </div>
        </div>
		<table class="jqgrid" id="gridlist"></table>
		<div id="gridpage"></div>
		<div class=" box box-warning bottongroup">
			<label id="allOk" class="btn btn-default btn-sm" onclick='javascript:history.go(-1)'><spring:message code="message.button.getBackSpacing"/></label>
		</div>
    </section>
    <%@ include file="/WEB-INF/component/commonJS.jsp"%>
    <script type="text/javascript">
        $(function () {
            $("#gridlist").jqGrid({
                url: "getStdCompdrugprofileLogList.html?compprofileId=${compprofileId}",
                mtype: "POST",
                datatype: "json",
                autowidth: true,
                height: 270,                   	
                colNames : ['<spring:message code="message.jqGrid.cz"/>',
                            '<spring:message code="message.listForm.xiuGaiXiangQing"/>',
                            '<spring:message code="message.listForm.xiuGaiRen"/>',
                            '<spring:message code="message.listForm.xiuGaiShiJian"/>' 
                            ],
                colModel : [ 
							 { name: 'operate', index: 'operate',width:10,key:true, align: "center",sortable:false,
							    formatter : function(val, opts, rowdata) {
							    	 return "<a href='toDrugProfileLogDetail.html?logId="+rowdata.logId+ "'  style='background:url(${ctx}/lib/img/icon/icon.png) no-repeat -100px 0px' class='opIcon' title='<spring:message code="message.jqGrid.cz.xiangQing"/>'></a>"; 
							     }
							 },
                             { name : 'detail', width : 200, align : "left",sortable:false },
                             { name : 'name', width : 30, align : "left" ,sortable:false},
                             { name : 'updDatetime', width : 35, align : "left",sortable:false }
                           ],
                rowNum: 20,
                rowList: [10, 20, 50,100],
                rownumbers: true,
                pager: "#gridpage",
                viewrecords: true,
                caption: "${profileCode} - ${profileName}&nbsp;<spring:message code='message.jqGrid.cz.weiHuJiLuLieBiao'/>",
                jsonReader: {
                	repeatitems: false,
                	id: "compRegId"
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
        });
        
        function likeQuery(){
        	var startDate  = $("#createTimeBegin").val();
       	    var endDate = $("#crateTimeEnd").val();
	       	$("#gridlist").jqGrid('setGridParam', {
	       		mtype:"post",
	       		postData:{
					"startDate":startDate,
					"endDate":endDate
			    },
	       	    page: 1 
	       }).trigger("reloadGrid");
       }
    	function showImg(imgPath,profileName) {
    		var url = "${ctx}/acctInfo/toImg.html";
    		$.HN.dialog.open({
    			"id" : "showImg",
    			"title" : profileName,
    			"url" : url,
    			"data" : {
    				"imgPath" : imgPath
    			},
    			"width" : 800,
    			"height" : 400,
    			"closefunc" : function(params) {
    				if (params) {

    				}
    			}
    		});
    	}
    </script>
</body>
</html>